#ifndef GAMESERVER_H
#define GAMESERVER_H

#include <game/game.h>
#include <QUdpSocket>

class GameServer : public Game
{
    Q_OBJECT;
public:
    GameServer(KeyManager *manager, QObject *parent = 0);

    void timerEvent(QTimerEvent *);

    void play();
    void pause();

private slots:
    void readPendingDatagrams();

private:
    QUdpSocket *mySocket;
    QVector<QPair<QHostAddress, int> > mySubscribers;
};

#endif // GAMESERVER_H
